// // 这就对于token值封装哈
// 那就导入到js 文件中使用啦
import store from '@/store'
const setToken = (token) => {
  store.commit('user/setToken', token)
}
const getToken = () => {
  return store.state.user.token
}
const removeToken = () => {
  store.commit('user/setToken', '')
}
// 关于refreshtokend的
const setRefreshToken = (setRefreshToken) => {
  store.commit('user/setRefreshToken', setRefreshToken)
}
const getRefreshToken = () => {
  return store.state.user.setRefreshToken
}
const removeRefreshToken = () => {
  store.commit('user/setRefreshToken', '')
}
export {
  setToken,
  getToken,
  removeToken,
  setRefreshToken,
  getRefreshToken,
  removeRefreshToken
}
